package BehavioralPattern.Strategy.NoStrategy;

/**
 * @Classname : NoStrategySale
 * @Description : 不使用策略模式
 * @Author : chentianyu
 * @Date 2023/2/26 10:54
 */


public class NoStrategySale {

    public void sell(String type, float price) {
        switch (type) {
            case "新顾客":
                System.out.printf("新顾客原价出售：%.2f 元\n", price);
                break;
            case "老顾客":
                System.out.printf("老顾客九折出售：%.2f 元\n", 0.9 * price);
                break;
            case "淡季抛售":
                System.out.printf("淡季八折抛售：%.2f 元\n", 0.8 * price);
        }
    }
}
